{% extends "pretixcontrol/admin/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% load rich_text %}

{% block title %}{% trans "Enable or disable billing validation" %}{% endblock %}
{% block content %}
    <nav id="event-nav" class="header-nav">
        <div class="navigation">
            <div class="navigation-title">
                <h1>{% trans "Enable or disable billing validation" %}</h1>
            </div>
            {% include "pretixcontrol/event/component_link.html" %}
        </div>
    </nav>
    <form action="" method="post" class="form-horizontal form-plugins">
        {% csrf_token %}
        {% if "success" in request.GET %}
            <div class="alert alert-success">
                {% trans "Your changes have been saved." %}
            </div>
        {% endif %}
        <div class="tabbed-form">
            <fieldset>
                <legend>{% trans "Enable or disable billing validation" %}</legend>
                <div class="table-responsive">
                    <table class="table">
                        <tr class="{% if billing_validation %}success{% else %}default{% endif %}">
                            <td>
                                <strong>{% trans "Validate billing information" %}</strong>
                            </td>
                            <td class="text-right flip" width="20%">
                                {% if billing_validation %}
                                    <button class="btn btn-default btn-block" name="billing_validation" value="disabled">
                                        {% trans "Disabled" %}
                                    </button>
                                {% else %}
                                    <button class="btn btn-default btn-block" name="billing_validation" value="enabled">
                                        {% trans "Enabled" %}
                                    </button>
                                {% endif %}
                            </td>
                        </tr>
                    </table>
                </div>
            </fieldset>
        </div>
    </form>
{% endblock %}
